Skip to content

fix: skip registry sync when a specific package is requested#22

Open
yashas-hm wants to merge 1 commit into
serverpod:mainfrom
yashas-hm-os:fix/issue-5-get-skills
Open

fix: skip registry sync when a specific package is requested#22
yashas-hm wants to merge 1 commit into
serverpod:mainfrom
yashas-hm-os:fix/issue-5-get-skills

Conversation

@yashas-hm

Copy link
Copy Markdown

Summary

  • skills get <package> no longer clones or updates git registry repositories as a side-effect. Registry sync now only runs for an unfiltered skills get.
  • Already-cloned local registries are still scanned during targeted installs, so they remain available if they happen to contain skills for the requested package.

Details

Previously, RegistrySync.sync() was called unconditionally, cloning all configured registries (e.g. the Flutter and Serverpod repos) into .dart_tool/skills/repos/ even when the user ran skills get jaspr. The registry skills were correctly filtered after cloning, but the cloning itself always happened, polluting the workspace with unrelated repos.

The fix guards the sync call behind if (packageNames == null), matching the intended semantics: a bare skills get (no args) fetches everything; skills get <package> only installs skills for that specific package without touching unrelated registries.

Test plan

  • New test when installing a specific package then registries are not cloned verifies that a configured global registry is not cloned when skills get dep_pkg is run and dep_pkg has its own Dart skills.
  • Existing registry tests (when git is unavailable, when installing from global registry) continue to pass.
  • Full test suite passes (dart test).

Closes #5
Fixes #5

@jakemac53

Copy link
Copy Markdown
Collaborator

I believe this is the intended behavior, because registries may contain skills for specific packages, they are cloned and scanned for any skills matching the given package.

In the next version, you will have the ability to remove/add your own registries, so if you just don't want them at all you will be able to opt out.

@yashas-hm

yashas-hm commented Jun 16, 2026

Copy link
Copy Markdown
Author

I believe this is the intended behavior, because registries may contain skills for specific packages, they are cloned and scanned for any skills matching the given package.

In the next version, you will have the ability to remove/add your own registries, so if you just don't want them at all you will be able to opt out.

Hi @jakemac53 & @marcelomendoncasoares,

I noticed there are differing views on the expected behavior, and I want to make sure this PR aligns with the maintainers' intent before moving forward.

The original issue reports that registries (e.g. the flutter and serverpod repos) are cloned even when running skills get jaspr, where those registries are entirely unrelated to jaspr. This PR addresses that by skipping the clone/update step when a specific package is requested. A bare skills get (no args) continues to clone and sync all registries exactly as before.
#5

Could you help clarify the intended behavior?

  • Should skills get <package> clone all configured registries (current behavior), on the assumption that any registry might contain skills for the requested package?
  • Or should it skip cloning registries and only install skills that are directly bundled with the requested package, leaving a bare skills get responsible for syncing registries?

Happy to adjust the approach once the expected behavior is confirmed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cloning all repositories even if not used.

2 participants